<?php
/* @var $this LogoAdminController */
/* @var $model Logo */

$this->breadcrumbs=array(
	'Logos'=>array('index'),
	'Manage',
);

$this->menu=array(
	array('label'=>'Thêm mới', 'url'=>array('create')),
);

Yii::app()->clientScript->registerScript('search', "
$('.search-button').click(function(){
	$('.search-form').toggle();
	return false;
});
$('.search-form form').submit(function(){
	$('#logo-grid').yiiGridView('update', {
		data: $(this).serialize()
	});
	return false;
});
");
?>
<h1>Quản trị Logo</h1>
<?php $this->widget('zii.widgets.grid.CGridView', array(
	'id'=>'logo-grid',
	'dataProvider'=>$model->search(),
	'filter'=>$model,
	'columns'=>array(
		'logo_id',
		array(
            'name'=>'logo_image',
            'type'=>'raw',
            'value'=>'CHtml::image(IMG_LOGO_FOLDER.$data->logo_image)',
        ),
        array(
            'name'=>'logo_status',
            'type'=>'raw',
            'value'=>'($data->logo_status)?"<input data-no-uniform=\"true\" checked type=\"checkbox\" class=\"iphone-toggle\" disabled=\"disabled\">":"<input data-no-uniform=\"true\" type=\"checkbox\" class=\"iphone-toggle\" disabled=\"disabled\">"',
        ),
		array(
			'class'=>'CButtonColumn',
            'deleteConfirmation'=>CONFIRM_DELETE,
		),
	),
)); ?>
